package cate.game.role.pay.trademall.oncefund.paycallback;

import cate.common.table.pay.PayItemRow;
import cate.game.GameBody;
import cate.game.pay.PayCallback;
import cate.game.role.Role;
import cp.solution.business.pay.PayRecordEntity;
import cp.solution.business.pay.dto.PayDeliverResult;

import static cate.game.role.pay.trademall.masterprivilege.RolePrivilegeMall.PRIVILEGE_TID_QUICK_FIGHT;
import static cate.game.role.pay.trademall.oncefund.OnceFundAllPO.FUND_ID_QUICK_FIGHT;

public class PayQuickFightFundPlusProCallback extends PayCallback {

    @Override
    public void onSuccess(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result) {
        PayItemRow pir = game.table.pay.item.get(record.itemTid);
        if (pir == null) {
            return;
        }
        role.getPay().tradeMall.once_fund_all.activeFund(FUND_ID_QUICK_FIGHT);
        role.getPay().tradeMall.privilegeMall.afterPay(PRIVILEGE_TID_QUICK_FIGHT);
    }

    @Override
    public void onFail(GameBody game, Role role, PayRecordEntity record, PayDeliverResult result) {

    }
}
